/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author dong
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import {BasicModel, Page, TreeDataModel} from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface JydqPlatform extends BasicModel<JydqPlatform> {
  name?: string; // 平台名称
  domain?: string; // 平台域名
  contact?: string; // 平台联系人
}

export const jydqPlatformList = (params?: JydqPlatform | any) =>
  defHttp.get<JydqPlatform>({ url: adminPath + '/jydq/platform/list', params });

export const jydqPlatformListData = (params?: JydqPlatform | any) =>
  defHttp.post<Page<JydqPlatform>>({ url: adminPath + '/jydq/platform/listData', params });

export const jydqPlatformForm = (params?: JydqPlatform | any) =>
  defHttp.get<JydqPlatform>({ url: adminPath + '/jydq/platform/form', params });

export const jydqPlatformSave = (params?: any, data?: JydqPlatform | any) =>
  defHttp.postJson<JydqPlatform>({ url: adminPath + '/jydq/platform/save', params, data });

export const jydqPlatformDelete = (params?: JydqPlatform | any) =>
  defHttp.get<JydqPlatform>({ url: adminPath + '/jydq/platform/delete', params });

export const platformTreeData = (params?: any) =>
  defHttp.get<TreeDataModel[]>({ url: adminPath + '/jydq/platform/treeData', params });
